import {Http} from "../utils/http"

class Article {
    static async getArticleDetail(aid) {
        return await Http.request({
            url: `/pages/${aid}`
        })
    }

    static async recordStudyTime(aid, duration) {
        return await Http.request({
            url: `/pages/${aid}/study`,
            data: {
                duration
            },
            method: 'POST'
        })
    }
}
export {
    Article
}
